import request, {postJson} from "@/apps/client/utils/request.ts";
const server = "/v1/user";
export function getGroupRoomsByFloor() {
    return request.get(server + `/getGroupRoomsByFloor`);
}
export function getRoomInfo(roomId) {
    return request.get(server + `/getRoomInfo?roomId=` + roomId);
}

export function reservationCubicle(data) {
    return request.post(server + `/reservationCubicle`, data, {
        headers: {
            'Content-Type': 'application/json'
        }
    });
}
export function cancelCubicleReservation(data) {
    return request.post(server + `/cancelCubicleReservation`, data, {
        headers: {
            'Content-Type': 'application/json'
        }
    });
}

export function getReservations(type, size, page) {
    return request.get(server + `/getReservations?type=${type}&size=${size}&page=${page}`);
}

export function getCubicleTimeSlots(data) {
    return request.post(server + `/getCubicleTimeSlots`, data, {
        headers: {
            'Content-Type': 'application/json'
        }
    });
}


export function clockInByReservationId(data) {
    return postJson(server + `/clockInByReservationId`, data);
}

export function clockOutByReservationId(data) {
    return postJson(server + `/clockOutByReservationId`, data);
}



